package com.qf.fmall.utils;

import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.io.FileUtil;
import cn.hutool.extra.mail.MailAccount;
import cn.hutool.extra.mail.MailUtil;

public class QfMailUtil {

    public static void main(String[] args) {
        MailAccount account = new MailAccount();
        account.setHost("smtp.qq.com");
        account.setPort(587);
        account.setAuth(true);
        account.setFrom("212135374@qq.com");
        account.setUser("212135374");
        account.setPass("xxmmfouyxlcubied");

        String send = MailUtil.send(account, CollUtil.newArrayList("dong_jl@163.com"),
                "测试", "邮件来自Hutool测试", false, FileUtil.file("D:/00qd-2304/names.txt"));
        System.out.println(send);
    }

}
